package uba.fi.tda.tp2;

public class EntradaDiccionario implements Hasheable{

	private String palabra;
	
	public String getPalabra() {
		return palabra;
	}

	public void setPalabra(String palabra) {
		this.palabra = palabra;
	}

	public int hash(int tamanio) {
		 int value = 0;
	        for(int pos = 0; pos < palabra.length(); pos++) {
	            value = 4 * value + palabra.charAt(pos);
	        }
	        return Math.abs(value % tamanio);   
	}

}
